<?php
/**
 * This file is part of the Sphoof framework.
 * Copyright (c) 2010-2011 Sphoof
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code. You can also view the
 * LICENSE file online at http://www.sphoof.nl/new-bsd.txt
 *
 * @category	Sphoof
 * @copyright	Copyright (c) 2010-2011 Sphoof (http://sphoof.nl)
 * @license		http://sphoof.nl/new-bsd.txt	New BSD License
 */

/**
 * Main function to bootstrap the application.
 *
 * @return SpBootstrap
 * @throws SpException
 */
function sphoof( ) {
	return new SpBootstrap( );
}

/**
 * Returns whether or not a file exists on the include path.
 *
 * @param string $filename
 * @return boolean
 */
function sphoof_file_exists( $filename ) {
	if( !file_exists( $filename ) ) {
		foreach( explode( PATH_SEPARATOR, get_include_path( ) ) as $path ) {
			if( file_exists( $path . DIRECTORY_SEPARATOR . $filename ) ) {
				return true;
			}
		}
		return false;
	}
	return true;
}